//
//  MStore.m
//  RRBI
//
//  Created by kyjun on 16/4/27.
//
//

#import "MStore.h"

@implementation MStore

-(instancetype)initWithStore:(NSDictionary *)item{
    self = [super init];
    if(self){
        self.storeID = [item objectForKey:@"site_id"];
        self.userID = [item objectForKey:@"uid"];
        self.ownerName = [item objectForKey:@"owner_name"];
        self.phone = [item objectForKey:@"phone"];
        self.mobile = [item objectForKey:@"mobile"];
        self.status = [item objectForKey:@"status"];
        self.freeShip = [item objectForKey:@"freeship_amount"];
        self.storeName = [item objectForKey:@"site_name"];
        self.statusRemark = [item objectForKey:@"status_remark"];
        self.notice = [item objectForKey:@"notice"];
        self.storeAddress = [item objectForKey:@"address"];
        self.balance = [item objectForKey:@"balance"];
        self.logo = [item objectForKey:@"logo"];
        self.send = [item objectForKey:@"send"];
        self.shopSale = [item objectForKey:@"shop_sale"];
        self.todayMoney = [item objectForKey:@"today"];
    }
    return self;
}


-(NSString *)todayMoney{
    if([WMHelper isNULLOrnil:_todayMoney]){
        return @"0.00";
    }
    return [NSString stringWithFormat:@"%.2f",[_todayMoney floatValue]];
}
@end
